package com.hightrast.service.api.domain.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.List;

/**
 * <p>
 * 订单商品
 * </p>
 *
 * @author hx
 * @since 2025-01-24
 */
@Data
@Accessors(chain = true)
@ApiModel(value="RastOrderProduct对象", description="订单商品")
public class QueryShopifyProduct {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty(value = "商品名称")
    private String title;

    @ApiModelProperty(value = "商品页面html")
    private String body_html;

    @ApiModelProperty(value = "品牌")
    private String vendor;

    @ApiModelProperty(value = "商品类型")
    private String product_type;

    @ApiModelProperty(value = "商品创建时间")
    private OffsetDateTime created_at;

    @ApiModelProperty(value = "商品发布的时间")
    private OffsetDateTime updated_at;

    @ApiModelProperty(value = "商品发布的时间")
    private OffsetDateTime published_at;

    @ApiModelProperty(value = "商品的发布范围")
    private String published_scope;

    @ApiModelProperty(value = "商品标签")
    private String tags;

    @ApiModelProperty(value = "商品状态")
    private String status;

    @ApiModelProperty(value = "商品变体")
    private List<ProductVariants> variants;

    @ApiModelProperty(value = "商品图片")
    private List<ProductImages> images;

    @Data
    @ApiModel("商品变体")
    public static class ProductVariants {
        @ApiModelProperty(value = "变体id")
        private Long id;
        @ApiModelProperty(value = "商品id")
        private Long product_id;
        @ApiModelProperty(value = "变体标题")
        private String title;
        @ApiModelProperty(value = "变体价格")
        private String price;
        @ApiModelProperty(value = "变体位置")
        private Integer position;
        @ApiModelProperty(value = "库存策略")
        private String inventory_policy;
        @ApiModelProperty(value = "比对价格")
        private String compare_at_price;
        @ApiModelProperty(value = "选项1")
        private String option1;
        @ApiModelProperty(value = "选项2")
        private String option2;
        @ApiModelProperty(value = "选项3")
        private String option3;
        @ApiModelProperty(value = "创建时间")
        private OffsetDateTime created_at;
        @ApiModelProperty(value = "更新时间")
        private OffsetDateTime updated_at;
        @ApiModelProperty(value = "是否课税")
        private Boolean taxable;
        @ApiModelProperty(value = "条形码")
        private String barcode;
        @ApiModelProperty(value = "履行服务")
        private String fulfillment_service;
        @ApiModelProperty(value = "重量（克）")
        private Integer grams;
        @ApiModelProperty(value = "库存管理")
        private String inventory_management;
        @ApiModelProperty(value = "是否需要运输")
        private Boolean requires_shipping;
        @ApiModelProperty(value = "商品编码")
        private String sku;
        @ApiModelProperty(value = "重量")
        private BigDecimal weight;
        @ApiModelProperty(value = "重量单位")
        private String weight_unit;
        @ApiModelProperty(value = "库存项目id")
        private Long inventory_item_id;
        @ApiModelProperty(value = "库存数量")
        private Integer inventory_quantity;
        @ApiModelProperty(value = "旧库存数量")
        private Integer old_inventory_quantity;
        @ApiModelProperty(value = "图片id")
        private Long image_id;
    }

    @Data
    @ApiModel("商品图片")
    public static class ProductImages {
        @ApiModelProperty(value = "图片id")
        private Long id;
        @ApiModelProperty(value = "描述")
        private String alt;
        @ApiModelProperty(value = "图片位置")
        private Integer position;
        @ApiModelProperty(value = "商品id")
        private Long product_id;
        @ApiModelProperty(value = "创建时间")
        private OffsetDateTime created_at;
        @ApiModelProperty(value = "修改时间")
        private OffsetDateTime updated_at;
        @ApiModelProperty(value = "宽度")
        private Integer width;
        @ApiModelProperty(value = "高度")
        private Integer height;
        @ApiModelProperty(value = "图片地址")
        private String src;
        @ApiModelProperty(value = "应用于的变体id")
        private List<Long> variant_ids;
    }

}
